<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title>登录</title>
    <link rel="stylesheet" href="../lib/css/animate.css">
    <link rel="stylesheet" href="../lib/css/delay.css">
    <link rel="stylesheet" href="../lib/css/frozen.css">
    <link rel="stylesheet" href="../lib/css/font-awesome.css">
    <link rel="stylesheet" href="../communal/css/style-lmh.css"/>
    <link rel="stylesheet" href="../communal/css/style_lcy.css"/>
    <link rel="stylesheet" href="../lib/css/bootstrap.main.css"/>
</head>
<style>
  /*  section{
        background-image: url(../communal/imgs/pojiu.jpg);
    }*/
</style>
<body>
<!--头部-->
<header class="ui-header ui-header-positive ui-border-b " style="background-color: #29AD7B;">
    <div class="tou1-lmh my-nav">
        <span class="shouye">首页</span>
        <span class="addres active">目的地</span>
        <span class="">酒店</span>
        <span>社区</span>
    </div>
    <div class="tou2-lmh">
            <span>
             <i class="fa fa-user-circle-o" aria-hidden="true"></i> 我的
            </span>
    </div>
</header>
<!--中间.......-->
<section class="ui-container">
    <div class="ui-form  form_lcy">
        <form>
            <div class="ui-form-item ui-form-item-pure  input_text1_lcy form-group">
                <input style="padding-left: 4vw;border: 3px solid rgba(100, 90, 90, 0.66);" class="form-control username" type="text" placeholder="手机号/邮箱">
            </div>
            <div class="ui-form-item ui-form-item-pure  input_text1_lcy form-group">
                <input style="padding-left: 4vw;border: 3px solid rgba(100, 100, 100, 0.66);" class="form-control userpass" type="password" placeholder="密码">
            </div>
            <div class="ui-btn-wrap font_tubiao_lcy" >
                <!--<button class="ui-btn ui-btn-primary zhuce_submit_lcy">-->
                    <!--登录-->
                <!--</button>-->
                <a href="javascript:;" class="zhuce_submit_lcy">登录</a>
                <br/>
                <a href="./register.html">注册</a>
            </div>
        </form>
    </div>
    <button id="attr">跳转</button>
</section>
<script src="../lib/js/zepto.min.v1.1.6.js"></script>
<script src="../lib/js/zepto.toch.js"></script>
<script src="../lib/js/frozen.js"></script>
<script>
    $('.tou1-lmh > span').eq(0).on("tap",function(){
        window.location.href = "./index-lmh.html";
    });
    $('.tou1-lmh > span').eq(1).on("tap",function(){
        window.location.href = "./mudidi-lcy.html";
    });
    $('.tou1-lmh > span').eq(2).on("tap",function(){
        window.location.href = "./Hotel-lmh.html";
    });
    $('.tou1-lmh > span').eq(3).on("tap",function(){
        window.location.href = "../communal/html/chat_Phone.html";
    });
    //    登录
    var loginbut = $(".zhuce_submit_lcy");
    loginbut.on('touchend',function(){
        var name = $(".username").val(),
                pass = $(".userpass").val();
        console.log(name);
        console.log(pass);
//        查询user是否存在
        $.ajax({
            type:"post",
            url:"/postloginuser",
            data:{text1:name,text2:pass},
            success:function(data){
                window.location.href = './index-lmh.html?a=2131';
                            console.log(data);
                console.log(data[0].phone_u);
                if(data.length>0){
                    localStorage.setItem("name",data[0].phone_u);
                    console.log(localStorage);
                    location.href='./index-lmh.html';
                }else{
                    alert("账号或密码错误");
                }
            }
        });
    });

</script>
</body>
</html>